﻿namespace BookMarks.Server.Dto;
/// <summary>
/// 
/// </summary>
public class NavConfigDto 
{
    /// <summary>
    /// 
    /// </summary>
    public List<NavConfig>? navConfig { get; set; }
}

/// <summary>
/// 基础配置类，包含iTab插件的各种配置信息
/// </summary>
public class BaseConfig
{
    /// <summary>
    /// 图标配置
    /// </summary>
    public IconConfig Icon { get; set; }
    /// <summary>
    /// 语言设置
    /// </summary>
    public string Lang { get; set; }
    /// <summary>
    /// 布局配置
    /// </summary>
    public LayoutConfig Layout { get; set; }
    /// <summary>
    /// 打开方式配置
    /// </summary>
    public OpenConfig Open { get; set; }
    /// <summary>
    /// 搜索框配置
    /// </summary>
    public SearchConfig Search { get; set; }
    /// <summary>
    /// 搜索框搜索引擎列表
    /// </summary>
    public List<SearchEngine> SearchEngine { get; set; }
    /// <summary>
    /// 侧边栏配置
    /// </summary>
    public SidebarConfig Sidebar { get; set; }
    /// <summary>
    /// 主题配置
    /// </summary>
    public ThemeConfig Theme { get; set; }
    /// <summary>
    /// 时间配置
    /// </summary>
    public TimeConfig Time { get; set; }
    /// <summary>
    /// 顶部搜索配置
    /// </summary>
    public List<TopSearch> TopSearch { get; set; }
    /// <summary>
    /// 默认使用的搜索引擎
    /// </summary>
    public string UseSearch { get; set; }
    /// <summary>
    /// 壁纸配置
    /// </summary>
    public WallpaperConfig Wallpaper { get; set; }
}


/// <summary>
/// 图标配置类
/// </summary>
public class IconConfig
{
    /// <summary>
    /// 图标布局方式
    /// </summary>
    public string IconLayout { get; set; }
    /// <summary>
    /// 图标圆角半径
    /// </summary>
    public int IconRadius { get; set; }
    /// <summary>
    /// 图标大小
    /// </summary>
    public int IconSize { get; set; }
    /// <summary>
    /// 图标X坐标
    /// </summary>
    public int IconX { get; set; }
    /// <summary>
    /// 图标Y坐标
    /// </summary>
    public int IconY { get; set; }
    /// <summary>
    /// 名称显示方式
    /// </summary>
    public int Name { get; set; }
    /// <summary>
    /// 名称颜色
    /// </summary>
    public string NameColor { get; set; }
    /// <summary>
    /// 名称字体大小
    /// </summary>
    public int NameSize { get; set; }
    /// <summary>
    /// 透明度
    /// </summary>
    public decimal Opacity { get; set; }
    /// <summary>
    /// 是否启动动画
    /// </summary>
    public bool StartAnimation { get; set; }
    /// <summary>
    /// 单位
    /// </summary>
    public string Unit { get; set; }
    /// <summary>
    /// 宽度
    /// </summary>
    public int Width { get; set; }
    /// <summary>
    /// X和Y坐标是否同步
    /// </summary>
    public bool Xysync { get; set; }
}

/// <summary>
/// 布局配置类
/// </summary>
public class LayoutConfig
{
    /// <summary>
    /// 视图类型
    /// </summary>
    public string View { get; set; }
    /// <summary>
    /// 是否显示一言
    /// </summary>
    public bool Yiyan { get; set; }
}

/// <summary>
/// 打开方式配置类
/// </summary>
public class OpenConfig
{
    /// <summary>
    /// 图标是否在新窗口打开
    /// </summary>
    public bool IconBlank { get; set; }
    /// <summary>
    /// 搜索区域是否在新窗口打开
    /// </summary>
    public bool SearchBlank { get; set; }
}

/// <summary>
/// 搜索框配置类
/// </summary>
public class SearchConfig
{
    /// <summary>
    /// 搜索框背景颜色
    /// </summary>
    public decimal BgColor { get; set; }
    /// <summary>
    /// 搜索更框高度
    /// </summary>
    public int Height { get; set; }
    /// <summary>
    /// 是否显示历史记录
    /// </summary>
    public bool History { get; set; }
    /// <summary>
    /// 搜索更多项的圆角半径
    /// </summary>
    public int Radius { get; set; }
    /// <summary>
    /// 是否显示搜索框
    /// </summary>
    public bool Show { get; set; }
    /// <summary>
    /// 翻译服务
    /// </summary>
    public string Translate { get; set; }
    /// <summary>
    /// 是否隐藏翻译
    /// </summary>
    public bool TranslateHide { get; set; }
}

/// <summary>
/// 搜索更多程类
/// </summary>
public class SearchEngine
{
    /// <summary>
    /// 搜索框URL
    /// </summary>
    public string Href { get; set; }
    /// <summary>
    /// 搜索框键
    /// </summary>
    public string Key { get; set; }
    /// <summary>
    /// 搜索功能标题
    /// </summary>
    public string Title { get; set; }
}

/// <summary>
/// 侧边栏配置类
/// </summary>
public class SidebarConfig
{
    /// <summary>
    /// 侧边栏是否自动隐藏
    /// </summary>
    public bool AutoHide { get; set; }
    /// <summary>
    /// 是否显示最后一个分组
    /// </summary>
    public bool LastGroup { get; set; }
    /// <summary>
    /// 是否启用鼠标分组
    /// </summary>
    public bool MouseGroup { get; set; }
    /// <summary>
    /// 透明度
    /// </summary>
    public decimal Opacity { get; set; }
    /// <summary>
    /// 侧边栏位置
    /// </summary>
    public string Placement { get; set; }
    /// <summary>
    /// 侧边栏宽度
    /// </summary>
    public int Width { get; set; }
}

/// <summary>
/// 主题配置类
/// </summary>
public class ThemeConfig
{
    /// <summary>
    /// 主题颜色
    /// </summary>
    public string Color { get; set; }
    /// <summary>
    /// 主题模式
    /// </summary>
    public string Mode { get; set; }
    /// <summary>
    /// 是否跟随系统主题
    /// </summary>
    public bool System { get; set; }
}

/// <summary>
/// 时间配置类
/// </summary>
public class TimeConfig
{
    /// <summary>
    /// 时间颜色
    /// </summary>
    public string Color { get; set; }
    /// <summary>
    /// 时间字体
    /// </summary>
    public string Font { get; set; }
    /// <summary>
    /// 时间字体粗细
    /// </summary>
    public int FontWeight { get; set; }
    /// <summary>
    /// 是否使用24小时制
    /// </summary>
    public bool Hour24 { get; set; }
    /// <summary>
    /// 农历显示方式
    /// </summary>
    public string Lunar { get; set; }
    /// <summary>
    /// 月份显示方式
    /// </summary>
    public string Month { get; set; }
    /// <summary>
    /// 是否显示秒
    /// </summary>
    public bool Sec { get; set; }
    /// <summary>
    /// 是否显示时间
    /// </summary>
    public bool Show { get; set; }
    /// <summary>
    /// 时间字体大小
    /// </summary>
    public int Size { get; set; }
    /// <summary>
    /// 星期显示方式
    /// </summary>
    public string Week { get; set; }
    /// <summary>
    /// 星期是否从1开始
    /// </summary>
    public bool WeekBegin1 { get; set; }
}

/// <summary>
/// 顶部搜索配置类
/// </summary>
public class TopSearch
{
    /// <summary>
    /// 顶部搜索ID
    /// </summary>
    public string Id { get; set; }
    /// <summary>
    /// 顶部搜索名称
    /// </summary>
    public string Name { get; set; }
}

/// <summary>
/// 壁纸配置类
/// </summary>
public class WallpaperConfig
{
    /// <summary>
    /// 壁纸模糊程度
    /// </summary>
    public int Blur { get; set; }
    /// <summary>
    /// 壁纸遮罩程度
    /// </summary>
    public int Mask { get; set; }
    /// <summary>
    /// 壁纸源
    /// </summary>
    public string Source { get; set; }
    /// <summary>
    /// 壁纸URL
    /// </summary>
    public string Src { get; set; }
    /// <summary>
    /// 壁纸缩略图
    /// </summary>
    public string Thumb { get; set; }
    /// <summary>
    /// 壁纸时间
    /// </summary>
    public int Time { get; set; }
    /// <summary>
    /// 壁纸类型
    /// </summary>
    public string Type { get; set; }
}

/// <summary>
/// 导航配置类
/// </summary>
public class NavConfig
{
    /// <summary>
    /// 导航图标
    /// </summary>
    public string Icon { get; set; }
    /// <summary>
    /// 导航ID
    /// </summary>
    public string Id { get; set; }
    /// <summary>
    /// 导航名称
    /// </summary>
    public string Name { get; set; }
    /// <summary>
    /// 导航子项列表
    /// </summary>
    public List<NavItem> Children { get; set; }
}

/// <summary>
/// 导航项类
/// </summary>
public class NavItem
{
    /// <summary>
    /// 组件名称
    /// </summary>
    public string Component { get; set; }
    /// <summary>
    /// 配置信息
    /// </summary>
    public Dictionary<string, object> Config { get; set; }
    /// <summary>
    /// 导航项ID
    /// </summary>
    public string Id { get; set; }
    /// <summary>
    /// 导航项名称
    /// </summary>
    public string Name { get; set; }
    /// <summary>
    /// 导航项大小
    /// </summary>
    public string Size { get; set; }
    /// <summary>
    /// 导航项类型
    /// </summary>
    public string Type { get; set; }
    /// <summary>
    /// 导航项视图
    /// </summary>
    public int? View { get; set; }
    /// <summary>
    /// 背景颜色
    /// </summary>
    public string BackgroundColor { get; set; }
    /// <summary>
    /// 图标文本
    /// </summary>
    public string IconText { get; set; }
    /// <summary>
    /// 图标源
    /// </summary>
    public string Src { get; set; }
    /// <summary>
    /// 导航项URL
    /// </summary>
    public string Url { get; set; }
}

/// <summary>
/// 笔记类
/// </summary>
public class Note
{
    /// <summary>
    /// 笔记内容
    /// </summary>
    public string Content { get; set; }
    /// <summary>
    /// 创建时间
    /// </summary>
    public long Ct { get; set; }
    /// <summary>
    /// 是否固定
    /// </summary>
    public bool Fixed { get; set; }
    /// <summary>
    /// 笔记ID
    /// </summary>
    public string Id { get; set; }
    /// <summary>
    /// 笔记标题
    /// </summary>
    public string Title { get; set; }
    /// <summary>
    /// 更新时间
    /// </summary>
    public long? Ut { get; set; }
}

/// <summary>
/// 待办事项类
/// </summary>
public class Todo
{
    /// <summary>
    /// 待办事项ID
    /// </summary>
    public string Id { get; set; }
    /// <summary>
    /// 待办事项内容
    /// </summary>
    public string Content { get; set; }
    /// <summary>
    /// 待办事项状态
    /// </summary>
    public bool Status { get; set; }
    /// <summary>
    /// 截止日期
    /// </summary>
    public DateTime? DueDate { get; set; }
}